package day01;

import java.io.*;

public class SequenceInputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        FileInputStream fin = new FileInputStream("D:\\1\\ObjectTest.java");
        BufferedInputStream bin = new BufferedInputStream(new FileInputStream(new File("D:\\1\\Object.txt")));
        SequenceInputStream sin = new SequenceInputStream(fin,bin);
        byte[] buff = new byte[1024];
        int len = -1;
        System.out.println("开始输出");
        while((len=sin.read(buff))!=-1) {
            System.out.println(new String(buff,0,len));
        }
        System.out.println("输出完毕");
        bin.close();
        fin.close();
        sin.close();
    }
}
